package com.work.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.work.domain.UserLoginlog;
import com.work.mapper.UserLoginlogMapper;
import com.work.service.UserLogService;

/**
 * 
 * @author zhubingyi
 *
 */
@Service
public class UserLogServiceImpl implements UserLogService{

	@Resource 
	private UserLoginlogMapper userlogMapper;

	//查询管理员用户上次登陆信息
	@Override
	public UserLoginlog findLoginInfo(String username) {
		// TODO Auto-generated method stub
		return userlogMapper.findLoginInfo(username);
	}
    //添加首次登陆用户日志
	@Override
	public int addLoginInfo(UserLoginlog userLog) {
		// TODO Auto-generated method stub
		return userlogMapper.addLoginInfo(userLog);
	}
	//查询所有的登陆日志列表
	@Override
	public List<UserLoginlog> findAllLoginLogInfo() {
		// TODO Auto-generated method stub
		return userlogMapper.findAllLoginLogInfo();
	}
	//删除用户日志信息
	@Override
	public Integer deleteLoginLogById(int id) {
		// TODO Auto-generated method stub
		return userlogMapper.deleteLoginLogById(id);
	}
	//根据条件查询用户信息
	@Override
	public List<UserLoginlog> findUserLogListByConditions(String usernamelog, String userrolelog, String loginiplog,
			String logintimelog) {
		// TODO Auto-generated method stub
		return userlogMapper.findUserLogListByConditions(usernamelog,userrolelog,loginiplog,logintimelog);
	}

    
}
